package map.hasmap_;

import java.util.*;

public class test {
    public static void main(String[] args) {
        Map hashMap = new HashMap<>();
        hashMap.put(1,new Emp("jack", 300000, 1));
        hashMap.put(1,new Emp("fuck", 10000, 2));
        hashMap.put(1,new Emp("duck", 120000, 3));
        Set p = hashMap.keySet();
        for(Object k:p){
            System.out.println(k+" "+hashMap.get(k));
        }
    }
}

class Emp{
    private String name;
    private double sal;
    private int id;
    public Emp(String name,double sal, int id){
        this.id = id;
        this.name = name;
        this.sal= sal;
    }
    public String toString(){
        return "emp="+name+sal+id;
    }
}
